This invention relates to cryptography and more particularly, to cryptographic techniques that support format translation.
Cryptographic systems are used to secure data in a variety of contexts. For example, encryption algorithms are used to encrypt sensitive information such as financial account numbers, social security numbers, and other personal information. By encrypting sensitive data prior to transmission over a communications network, the sensitive data is secured, even if it passes over an unsecured communications channel. Sensitive data is also sometimes encrypted prior to storage in a database. This helps to prevent unauthorized access to the sensitive data by an intruder.
Commonly used encryption algorithms include the Advanced Encryption Standard (AES) encryption algorithm and the Data Encryption Standard (DES) encryption algorithm. These conventional encryption algorithms can significantly alter the format of a data item. For example, encryption of a numeric string such as a credit card number may produce a string that contains non-numeric characters or a string with a different number of characters. Because the format of the string is altered by the encryption process, it may not be possible to store the encrypted string in the same type of database table that is used to store unencrypted versions of the string, making it difficult or impossible to encrypt the entries in a database.
To address the problems associated with altering the format of a string during cryptographic operations, format-preserving encryption (FPE) algorithms have been proposed. When an FPE algorithm is used to encrypt or decrypt a string in a given format, the format of the string is not changed during the encryption or decryption process. This ensures that the length of the string and the character set for the string is unaffected by encryption and decryption operations.
Although FPE algorithms can be helpful in avoiding the disruptions associated with altered string formats, situations sometimes arise in which it would be desirable to change the length of the string and other string format attributes in a predictable way. For example, it might be desirable to shorten or lengthen a string to a particular length during encryption or decryption operations or it might be desirable to change one type of string into another as part of an encryption or decryption process.
It would therefore be desirable to be able to provide improved ways in which to cryptographically process data in a system.